<template>
	<div id="common">
		<i @click="back" :style="iconClass" class = "el-icon-arrow-left"></i>
        <p>{{title}}-{{count}}</p>
		<span v-for="(item,index) in data">
			{{item.name}}---{{index}}
		</span>
	</div>
</template>

<script>
	export default{
		name:"common",
		props:{
			title:
			{type:String,
				default:"我是标题",
				},
				count:{
					type:Number,
					default:0
				},
				iconClass:{
					type:Object,
					default:{}
				},
				data:{
					type:Array,
					default:[]
				}
			},
				
		data(){
			return{
			}
		},
		methods:{
			back(){
				this.$emit("callBack","login")
			}
		}
		
	}
</script>

<style>
	#common{
		display: flex;
		height: 60px;
		width: 100%;
		background-color: aliceblue;
		align-items: center;
	}
	#common p{
		display: flex;
		font-size: 18px;
		margin-right: 15px;
	}
</style>